#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>
#include<assert.h>
typedef int HpDataType;

typedef struct 
{
	HpDataType* arr;
	int size;
	int capacity;
}Heap;


void Heapcreat(Heap* hp)
{
	hp->arr=(HpDataType*)malloc(4*sizeof(HpDataType));
	if(hp->arr==NULL)
	{
		perror("malloc fail");
		return ; 
	}
	hp->size=0;
	hp->capacity=4;
}

void heapInit(Heap* hp,HpDataType* a,int b)
{
	assert(hp);	
} 


void AjdustUp(HpDataType*arr,int child)
{
	assert(arr);
	int parent=(child-1)/2;
	while(arr[parent]>arr[child]&&child>0)//璇昿arent>=0锛屽彲浠ヤ絾鏄笉濂斤細
											//child=0鈥斺€斻€媝arent=0锛?
	{
		int temp=arr[parent];
		arr[parent]=arr[child];
		arr[child]=temp;
		child=parent;
		parent=(child-1)/2;
	}
	return;
}


int main()
{
	
	return 0;
}

